package com.youngjun.core.controller;

import com.youngjun.common.controller.support.*;
import com.youngjun.core.pojo.dto.UserDTO;
import com.youngjun.core.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("user")
public class UserController implements BaseController {

    @Autowired
    UserService userService;

    @RequestMapping(value = "demo",method = RequestMethod.POST)
    public ResponseEntity<R> demo(@RequestBody UserDTO dto){
//        PageParams pageParams = new PageParams(dto.getCurrent(), dto.getPageSize(), dto.getOrderBy());
//        PageHelper.startPage(pageParams);
//        return ResponseEntity.ok().body(R.create().data(new PageInfo(userService.demo(dto),pageParams)));
        userService.demo(null);
        return null;
    }

}